import axios from 'axios'

export const getDevices = () => {
	return axios.get('/demo/devices')
		.then((response) => Promise.resolve(response.data.result))
}

export const addDevice = ({ name, deviceId }) => {
	return axios.post('/demo/device', { name, deviceId })
		.then((response) => Promise.resolve(response.data.result))
}

export const deleteDevice = (id) => {
	return axios.delete('/demo/device/' + id)
		.then((response) => Promise.resolve(response.data.result))
}

